% 3D Pressure Camp - Regular Grid - Finite Volume Method
%
% function -> vetor -> gives the point coordinates
%
% by jose augusto f. ramos (zeaugustofr@gmail.com) last update date
% 22/08/11

function [top,back,left,center,right,front,buttom] = ...
    vetor(dx,dy,dz,ktop,kback,kleft,kright,kfront,kbuttom)

dxa = dx;
dya = dy;
dza = dz;

if kfront == 0 || kback == 0
    
    dxa = dx/2;
    
end

if kleft == 0 || kright == 0
    
    dya = dy/2;
    
end

if ktop == 0 || kbuttom == 0
    
    dza = dz/2;
    
end


top = ktop*(dxa*dya)/dz;
back = kback*(dya*dza)/dx;
left = kleft*(dxa*dza)/dy;

right = kright*(dxa*dza)/dy;
front = kfront*(dya*dza)/dx;
buttom = kbuttom*(dxa*dya)/dz;

center = (buttom+front+right+left+back+top)*(-1);